package net.sx.minemodule.mvp.activities;

import android.os.Bundle;

import com.alibaba.android.arouter.facade.annotation.Route;
import com.alibaba.android.arouter.launcher.ARouter;
import com.homegoods.aroutercomment.ARouterPath;
import com.kedll.library.base.MyBaseFragmentActivity;
import com.kedll.library.mvp.BasePresenter;
import com.kedll.library.util.MyUtils;

import net.sx.minemodule.R;
import net.sx.minemodule.databinding.MineActivityMineAboutBinding;

/**
 * 关于我们
 * @author 邵帅
 */
@Route(path = ARouterPath.PATH_MINE_ABOUT_MINE)
public class MineAboutActivity extends MyBaseFragmentActivity<MineActivityMineAboutBinding,BasePresenter> {


    @Override
    protected int getLayout() {
        return R.layout.mine_activity_mine_about;
    }

    @Override
    protected void initToolBar(Bundle savedInstanceState) {
        super.initToolBar(savedInstanceState);
        setTitle("关于我们");

//        mBinding.tvVersionCodeAbout.setText(String.format("版本号: %s", MyUtils.getVersionCode(this)));
    }

    @Override
    protected void initEvent() {
        //版权信息
        mBinding.entryCopyrightInfo.setOnClickListener(v -> {
            ARouter.getInstance().build(ARouterPath.PATH_COPYRIGHT_INFO).navigation();
        });

        //意见反馈
        mBinding.entryOpinionFeedback.setOnClickListener(v -> {
            ARouter.getInstance().build(ARouterPath.PATH_MINE_FEEDBACK).navigation();
        });
    }

    @Override
    protected void initData(Bundle savedInstanceState) {
        super.initData(savedInstanceState);
        mBinding.entryCopyrightInfo.setLeftTextAndRightImage("版权信息", true);
        mBinding.entryOpinionFeedback.setLeftTextAndRightImage("意见反馈", true);
    }

    @Override
    protected BasePresenter getPresenter() {
        return null;
    }
}
